package classAdapter;

/**
 * @projectName: com.xiayuanxing.designPattern
 * @className: VoltageAdapter
 * @author: xiayuanxing
 * @description: 适配器类
 * @date: 2021/12/21 14:37
 * @version: 1.0
 */
public class VoltageAdapter extends Voltage220V implements IVoltage5V{

    public int output5V() {
        //获取到220V电压
        int srcV = output220V();
        //转成5v
        int dstV =srcV/44;
        return dstV;
    }
}
